package com.hohai.river.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hohai.river.entity.SysIndex;

import java.util.List;

/**
 * 指标表
 *
 */
public interface SysIndexService extends IService<SysIndex> {

	/**
	 * 级联删除指标
	 * @param id 指标ID
	 * @return true成功, false失败
	 */
	Boolean removeIndexById(Long id);

	/**
	 * 构建树
	 */
	List<Tree<Long>> treeIndex();

	/**
	 * 构建树，并过滤
	 */
	List<Tree<Long>> treeIndexFiltered(Long riverId, Boolean expert);

	SysIndex getInfoByIndexCode(String indexCode);

}
